package global

import (
	"gorm.io/plugin/soft_delete"
	"time"
)

type Model struct {
	ID         uint      `gorm:"primarykey;comment:主键ID" json:"id" structs:"-"`                              // 主键ID
	CreateTime time.Time `gorm:"type:datetime(0);autoCreateTime;comment:创建时间" json:"createTime" structs:"-"` // 创建时间
	UpdateTime time.Time `gorm:"type:datetime(0);autoUpdateTime;comment:更新时间" json:"updateTime" structs:"-"` // 更新时间
	// 逻辑删除 0 1
	IsDeleted soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt;default:0;comment:删除状态 0未删除 1已删除" json:"isDeleted" structs:"is_deleted"` // 删除状态
}
